home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
3_17.lha
/
3_17
/
3_17a.c
next >
Wrap
C/C++ Source or Header
|
1993-08-08
|
485b
|
35 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ Example 1 of indentation styles
/ Kernighan-Ritchie style
include <stdio.h>
nt main(int, char**)
int a;
for (a = 0; a < 4; ) {
a++;
}
if (a > 1) {
printf(">1");
} else {
printf("<2");
}
switch (a) {
case 3:
printf("3");
break;
default:
printf("!=3");
break;
}
do {
printf("DW");
} while (a++ < 8);